<%@ include file="../common.jsp"%>

<c:choose>
	<c:when test="${size eq 0}">
		No Records Found.
	</c:when>
	<c:otherwise>
		<div style="width: 40%;">
			<table class="viewDetails">
				<tr class="adminTableMainHeaderColor tableChildHeaderFont">
					<th colspan="3" align="center"><span class="searchResultsCaption" > LIST OF DOCUEMNT CATEGORY (S) </span></th>
				</tr>
				<tr class="heading">
					<th> Category </th>
					<th> Code </th>
					<th> Type </th>
				</tr>	
				
				<c:set var="rowNumber" value="0"></c:set>
				 <c:forEach var="docTypeMap" items="${docTypeMap}" varStatus="loop">
				 	<c:forEach items="${docTypeCatMap[docTypeMap.key]}" var="docCategory">
				 		<c:set var="rowNumber" value="${rowNumber + 1}"></c:set>
						<c:set var="tabColor" value="odd"></c:set>
					     	<c:if test="${(rowNumber % 2) eq 0}">
					        	<c:set var="tabColor" value="even"></c:set>
					        </c:if>
						<tr class="${tabColor}">
							<td>${docCategory.dcName}</td>
							<td>${docCategory.dcCode}</td>
							<td>${docTypeMap.value}</td>
						</tr>
					 </c:forEach>
				</c:forEach>	
			</table>
		</div>
	</c:otherwise>
</c:choose>